﻿using System;
using System.Collections.Generic;

using System.Web;
using FTchina.Library;
namespace FTchina.SearchQuery
{
    /// <summary>
    ///QueryModel 的摘要说明
    /// </summary>
    public class QueryModel
    {
        public QueryModel()
        {
            //
            //TODO: 在此处添加构造函数逻辑
            //
             
        }

        /// <summary>
        /// 表名
        /// </summary>
        public String TableName
        {
            get { return SecurityHelper.Decrypt(Library.RequestHelper.GetCookie("TableName")); }
            set { Library.RequestHelper.WriteCookie("TableName", SecurityHelper.Encrypt(value)); }
        }
        public String SqlWhere
        {
            get { return SecurityHelper.Decrypt(Library.RequestHelper.GetCookie("SqlWhere")); }
            set { Library.RequestHelper.WriteCookie("SqlWhere", SecurityHelper.Encrypt(value)); }
        }
        public String GetCountSql
        {
            get { return SecurityHelper.Decrypt(Library.RequestHelper.GetCookie("GetCountSql")); }
            set { Library.RequestHelper.WriteCookie("GetCountSql", SecurityHelper.Encrypt(value)); }
        }
        public String GetTableSql
        {
            get { return SecurityHelper.Decrypt(Library.RequestHelper.GetCookie("GetTableSql")); }
            set { Library.RequestHelper.WriteCookie("GetTableSql", SecurityHelper.Encrypt(value)); }
        }
        public String ReturnPage
        {
            get { return SecurityHelper.Decrypt(Library.RequestHelper.GetCookie("ReturnPage")); }
            set { Library.RequestHelper.WriteCookie("ReturnPage", SecurityHelper.Encrypt(value)); }
        }
        public String WorkPage
        {
            get { return SecurityHelper.Decrypt(Library.RequestHelper.GetCookie("WorkPage")); }
            set { Library.RequestHelper.WriteCookie("WorkPage", SecurityHelper.Encrypt(value)); }
        }


        /// <summary>
        /// 存储页面条件
        /// </summary>
        public String Key1
        {
            get { return SecurityHelper.Decrypt(Library.RequestHelper.GetCookie("Key1")); }
            set { Library.RequestHelper.WriteCookie("Key1", SecurityHelper.Encrypt(value)); }
        }
        /// <summary>
        /// 存储页面条件
        /// </summary>
        public String Key2
        {
            get { return SecurityHelper.Decrypt(Library.RequestHelper.GetCookie("Key2")); }
            set { Library.RequestHelper.WriteCookie("Key2", SecurityHelper.Encrypt(value)); }
        }/// <summary>
        /// 存储页面条件
        /// </summary>
        public String Key3
        {
            get { return SecurityHelper.Decrypt(Library.RequestHelper.GetCookie("Key3")); }
            set { Library.RequestHelper.WriteCookie("Key3", SecurityHelper.Encrypt(value)); }
        }/// <summary>
        /// 存储页面条件
        /// </summary>
        public String Key4
        {
            get { return SecurityHelper.Decrypt(Library.RequestHelper.GetCookie("Key4")); }
            set { Library.RequestHelper.WriteCookie("Key4", SecurityHelper.Encrypt(value)); }
        }/// <summary>
        /// 存储页面条件
        /// </summary>
        public String Key5
        {
            get { return SecurityHelper.Decrypt(Library.RequestHelper.GetCookie("Key5")); }
            set { Library.RequestHelper.WriteCookie("Key5", SecurityHelper.Encrypt(value)); }
        }/// <summary>
        /// 存储页面条件
        /// </summary>
        public String Key6
        {
            get { return SecurityHelper.Decrypt(Library.RequestHelper.GetCookie("Key6")); }
            set { Library.RequestHelper.WriteCookie("Key6", SecurityHelper.Encrypt(value)); }
        }
       
    }
}